<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>04_JS运算符</title>
</head>
<body>
<script>
    console.log(6/3);//2
    console.log(3/2);//1.5
    console.log(3>10);//false
    console.log(3>'10');//false
    console.log('3'>10);//false
    /*字符串比较编码*/
    console.log('3'>'10');//true  比较编码  只有0-1有编码 '10'是1的编码  '3'是3的编码
    console.log('硕'>'杰');//true  比较编码
    console.log('硕'.charCodeAt());//30805
    console.log('杰'.charCodeAt());//26480

    let a=1;
    let b=true;
    console.log(a==b);//松散比较运算符，只比较值
    console.log(a===b);//严格比较运算符，先会比较类型，类型一致在比较值

    let  c=0;
    console.log( c==0 ?'YSE':'NO');//yes
    console.log( c=0 ?'YSE':'NO');//no

</script>
</body>
</html>